import request from '@/request/request'

// 产品模型 - 列表（
export function ApplicationProductsList(params) {
    return request({
        url: '/dev-api/portal/exchangeResults/list',
        method: 'get',
        params
    })
}
// 产品模型 - 详情（
export function ApplicationProductsDetail(params) {
    return request({
        url: '/dev-api/portal/productModel/detail',
        method: 'get',
        params
    })
}

// 产品模型 - 轮播（
export function ApplicationProductsGetPictureById(params) {
    return request({
        url: '/dev-api/portal/exchangeResults/getPictureById',
        method: 'get',
        params
    })
}

// 点赞
export function dianzans(data) {
  return request({
    url: "/dev-api/portal/PraiseAndCollect/addPraise",
    method: "post",
    data,
  });
}

// 取消点赞
export function qxdianzans(params) {
    return request({
        url: '/dev-api/portal/PraiseAndCollect/deletePraise',
        method: 'get',
        params
    })
}

// 收藏
export function shoucangs(data) {
  return request({
    url: "/dev-api/portal/PraiseAndCollect/addCollect",
    method: "post",
    data,
  });
}

// 取消收藏
export function qxshoucangs(params) {
    return request({
        url: '/dev-api/portal/PraiseAndCollect/deleteCollect',
        method: 'get',
        params
    })
}

// 获取积分id
export function integral(params) {
    return request({
        url: '/dev-api/portal/productModel/getConsumeById',
        method: 'get',
        params
    })
}


// 加入购物车
export function jrgwcs(data) {
  return request({
    url: "/dev-api/portal/Cart/addCart",
    method: "post",
    data,
  });
}

// 评价
export function pjs(data) {
  return request({
    url: "/dev-api/portal/exchangeResults/addComment",
    method: "post",
    data,
  });
}


// 评价列表
export function evaluate(params) {
    return request({
        url: '/dev-api/portal/exchangeResults/getCommentById',
        method: 'get',
        params
    })
}

// 评价删除
export function delate(params) {
    return request({
        url: '/dev-api/portal/exchangeResults/deleteComment',
        method: 'get',
        params
    })
}


// 供应商产品列表
export function productList(params) {
    return request({
        url: '/dev-api/portal/productModel/getProductListByName',
        method: 'get',
        params
    })
}

// 分类查询
export function CategoryManage(params) {
    return request({
        url: '/dev-api/portal/CategoryManage/getCategoryManage',
        method: 'get',
        params
    })
}
